package cn.szzsi.service;

import cn.szzsi.core.kit.UtilDate;
import cn.szzsi.common.model.Member;
import cn.szzsi.common.model.UserSing;

/**
 * Service实现类 - 站内信服务
 * 
 */
public class UserSingService {
	public static final UserSingService me = new UserSingService();

	/**
     * 检查该会员今天是否签到
     * @param member
     * @return
     */
	public boolean checkIfUserSign(Member member){
		boolean flag = false;
		UserSing lastSign= UserSing.dao.getLastSignRecord(member.getStr("id"));//查询买家最后一次签到记录
		if(lastSign!=null){
			Long lastDateTime=lastSign.getDate("createDate").getTime();//最后一次签到时间戳
			Long todatStartTime= UtilDate.getTodayStartTime();//当天凌晨时间戳
			if(todatStartTime<lastDateTime){//已经签到
				flag = true;
			}
		}
		return flag;
	}
}